#pragma once
#include <string>
#include <vector>

// 相机配置结构体
struct CameraConfig {
    int device_id{0};
    int width{1920};
    int height{1080};
    int fps{30};
    int exposure{-6};
    int gain{10};
};

// 网络配置结构体
struct NetworkConfig {
    struct {
        int port{8080};
        std::string ip{"127.0.0.1"};
        int max_connections{5};
    } tcp;
    
    struct {
        int port{8081};
        std::string ip{"127.0.0.1"};
        int buffer_size{65536};
    } udp;
};

// 推理配置结构体
struct InferenceConfig {
    std::string model_path;
    int batch_size{1};
    float threshold{0.5f};
    float nms_threshold{0.45f};
    std::vector<std::string> class_names;
    bool enable_tensorrt{true};
};

// 显示配置结构体
struct DisplayConfig {
    int width{1280};
    int height{720};
    int fps{30};
    bool show_fps{true};
    bool show_detection{true};
    bool debug_view{false};
    int font_size{12};
    int line_thickness{2};
};

// 日志配置结构体
struct LogConfig {
    std::string path{"../logs/"};
    std::string level{"debug"};
    bool enable_console{true};
    int max_size{10485760};  // 10MB
    int max_files{10};
    int flush_interval{3};
};

// 总配置结构体
struct AppConfig {
    std::string version{"1.0.0"};
    std::string env{"default"};
    CameraConfig camera;
    NetworkConfig network;
    InferenceConfig inference;
    DisplayConfig display;
    LogConfig log;
}; 